<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="./_react/react.development.js"></script>
    <script src="./_react/react-dom.development.js"></script>
    <script src="./_react/babel.js"></script>
  </head>
  <body>
    <div id="app"></div>

    <script type="text/babel">
      class Counter extends React.Component {
        constructor(props) {
          super(props);
          this.state = {
            count: 0,
          };
        }

        render() {
          return (
            <div>
              <p>Count: {this.state.count}</p>
              <button onClick={this.increment}>Increment</button>
            </div>
          );
        }

        increment = () => {
          this.setState({ count: this.state.count + 1 });
        };
      }

      function App() {
        return <Counter />;
      }

      ReactDOM.render(<App />, document.getElementById("app"));
    </script>
  </body>
</html>
